package com.zbl.zblproject.member.service.impl;

import com.zbl.zblproject.member.entity.Member;
import com.zbl.zblproject.member.mapper.MemberMapper;
import com.zbl.zblproject.member.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2019/3/27
 */
@Service
public class MemberServiceImpl implements MemberService {

    @Autowired
    private MemberMapper memberMapper;


    @Override
    public Member searchByTelephone(String telephone) {
        return memberMapper.searchByTelephone(telephone);
    }

    @Override
    public Member searchMember(String openId) {

        return memberMapper.searchByOpenId(openId);
    }

    @Override
    public boolean addMember(Member member) {
        return memberMapper.insert(member) == 1;
    }
}
